package com.bit.springbook.controller;

import com.bit.springbook.model.UserInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public String t1() {
        return "t1";
    }
    @RequestMapping("/t2")
    public Integer t2() {
        return 1234;
    }
    @RequestMapping("/t3")
    public Boolean t3() {
        return true;
    }
    @RequestMapping("/t4")
    public UserInfo t4() {
        return new UserInfo();
    }

    @RequestMapping("/t5")
    public Boolean t5() {
        int i = 1 / 0;
        return false;
    }

    @RequestMapping("/t6")
    public Boolean t6() {
        String a = null;
        System.out.println(a.getBytes());
        return false;
    }

    @RequestMapping("/t7")
    public Boolean t7() {
        int[] arr = {};
        int a = arr[9];
        return false;
    }
}
